package com.mvp.shq.washer.ui.modifyMobile;

import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.http.Api;
import com.mvp.shq.washer.http.RxSchedulers;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2017/8/31.
 */

public class Model implements ModifyMobileConstract.Model {
    @Override
    public Observable<BaseResult<String>> code(String token, String mobile) {
        return Api.getInstance().service
                .modifyMobileCode(token,mobile)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> modify(String token, String userId, String oldPwd, String newMobile, String code) {
        return Api.getInstance().service
                .modifyMobile(token,userId,oldPwd,newMobile,code)
                .compose(RxSchedulers.io_main());
    }
}
